<?php
/**
 * The template for displaying Comments.
 *
 * The area of the page that contains both current comments
 * and the comment form.  The actual display of comments is
 * handled by a callback to twentyten_comment which is
 * located in the functions.php file.
 *
 * @package WordPress
 * @subpackage Twenty_Ten
 * @since Twenty Ten 1.0
 */
?>

				<div id="comments">
					<?php if ( post_password_required() ){; ?>
						<p class="nopassword"><?php _e( 'This post is password protected. Enter the password to view any comments.', 'twentyten' ); ?></p>
					</div><!-- #comments -->
					<?php
						/* Stop the rest of comments.php from being processed,
						 * but don't kill the script entirely -- we still have
						 * to fully load the template.
						 */
						return;
					};
			?>
<?php
	// You can start editing here -- including this comment!
?>

			<?php if ( have_comments() ) {; ?>
				<h3 id="comments-title"><?php
					printf( _n( 'One Response to %2$s', '%1$s Responses to %2$s', get_comments_number(), 'twentyten' ),
					number_format_i18n( get_comments_number() ), '<em>' . get_the_title() . '</em>' );
				?></h3>

				<ol class="commentlist">
					<?php foreach ($comments as $comment) {; 
					$author_url = $comment->comment_author_url;
					$author_name = $comment->comment_author;?>
					<li class="comment">
						<div id="comment-<?php comment_ID() ?>">
							<div class="avarta"><?php echo get_avatar( $comment, 40 ); ?></div>
							<div class="comment-content">
								<div class="comment-author">
									<strong><a target="_blank" href="<?php echo $author_url;?>"><?php echo $author_name;?></strong></a>
									<span class="says"><?php _e('says:','sakura');?></span>
								</div>
								<div class="comment-meta">
									<small class="commentmetadata"><em><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('Y.m.d l') ?> <?php comment_time() ?></a></em>
										<?php edit_comment_link('编辑',' [',']'); ?>
										</small>
									</div>
							<?php if ($comment->comment_approved == '0') {; ?>
							<em><?php _e('Your comment is awaiting moderation.','sakura');?></em>
							<?php }; ?>
								<div class="comment-text"><?php comment_text() ?></div>
							</div>
							<div style="clear:both"></div>
						</div>
					</li>
		<?php }; /* end for each comment */ ?>
				</ol>
			<?php }else{; // or, if we don't have comments:
			/* If there are no comments and comments are closed,
			 * let's leave a little note, shall we?
			 */
				if ( ! comments_open() ) {
				?>
				<p class="nocomments"><?php _e( 'Comments are closed.', 'twentyten' ); ?></p>
				<?php }; // end ! comments_open() ?>

			<?php }; // end have_comments() ?>
			<?php comment_form(); ?>
			</div><!-- #comments -->
